﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows;
using System.Windows.Media;
using Visifire.Charts;

namespace CPPEI.Coolzon.UI.DataPartLib
{
    public partial class DataChartAxisBase
    {
        private Axis axisY2;
        protected Axis getAxisY2()
        {
            axisY2 = new Axis();
            axisY2.AxisType = AxisTypes.Secondary;
            axisY2.Enabled = AxisY2Enabled;
            axisY2.StartFromZero = AxisY2StartFromZero;
            axisY2.AxisMinimum = AxisY2Minimum;
            axisY2.AxisMaximum = AxisY2Maximum;
            axisY2.LineStyle = AxisY2LineStyle;
            axisY2.LineColor = AxisY2LineColor == null ? null : AxisY2LineColor.Brush;
            axisY2.LineThickness = AxisY2LineThickness;
            axisY2.Title = AxisY2Title;
            axisY2.TitleFontFamily = AxisY2TitleFontFamily;
            axisY2.TitleFontWeight = AxisY2TitleFontWeight;
            axisY2.TitleFontSize = AxisY2TitleFontSize;
            axisY2.TitleFontColor = AxisY2TitleFontColor == null? null : AxisY2TitleFontColor.Brush;
            axisY2.IntervalType = AxisY2IntervalType;
            axisY2.Interval = AxisY2Interval;
            axisY2.Prefix = AxisY2Prefix;
            axisY2.Suffix = AxisY2Suffix;
            axisY2.ValueFormatString = AxisY2ValueFormatString;
            axisY2.Logarithmic = AxisY2Logarithmic;
            axisY2.LogarithmBase = AxisY2LogarithmBase;

            AxisLabels axisLabel = new AxisLabels();
            axisLabel.Enabled = AxisY2LabelEnable;
            axisLabel.FontFamily = AxisY2LabelFontFamily;
            axisLabel.FontWeight = AxisY2LabelFontWeight;
            axisLabel.FontSize = AxisY2LabelFontSize;
            axisLabel.FontColor = AxisY2LabelFontColor == null?null : AxisY2LabelFontColor.Brush;
            axisLabel.Angle = AxisY2LabelAngle;
            axisLabel.Rows = AxisY2LabelRows;
            axisLabel.TextAlignment = AxisY2LabelTextAlignmnet;
            if (AxisY2LabelTextWrap != null && AxisY2LabelTextWrap.Value >=0 && AxisY2LabelTextWrap.Value <= 1)
                axisLabel.TextWrap = AxisY2LabelTextWrap.Value;
            //axisLabel.Interval = AxisY2LabelInterval;

            axisY2.AxisLabels = axisLabel;

            ChartGrid chartGrid = new ChartGrid();
            chartGrid.Enabled = AxisY2ChartGridEnable;
            chartGrid.LineColor = AxisY2ChartGridLineColor == null? null : AxisY2ChartGridLineColor.Brush;
            chartGrid.LineStyle = AxisY2ChartGridLineStyle;
            chartGrid.LineThickness = AxisY2ChartGridLineThickness;
            chartGrid.InterlacedColor = AxisY2ChartGridInterlacedColor == null? null : AxisY2ChartGridInterlacedColor.Brush;
            //chartGrid.Interval = AxisY2ChartGridInterval;
            axisY2.Grids.Add(chartGrid);

            Ticks ticks = new Ticks();
            ticks.Enabled = AxisY2TickEnabled;
            //ticks.Interval = AxisY2TickInterval;
            ticks.LineColor = AxisY2TickLineColor == null? null : AxisY2TickLineColor.Brush;
            ticks.LineStyle = AxisY2TickLineStyles;
            ticks.LineThickness = AxisY2TickLineThickness;
            ticks.TickLength = AxisY2TickLength;
            axisY2.Ticks.Add(ticks);

            return axisY2;
        }

        private bool axisY2Enabled;
        private bool axisY2StartFromZero;
        private double axisY2Minimum;
        private double axisY2Maximum;
        private double axisY2Interval;
        private Visifire.Charts.LineStyles axisY2LineStyle;
        private BrushEx axisY2LineColor;
        private int axisY2LineThickness;
        private string axisY2Title;
        private FontFamily axisY2TitleFontFamily;
        private FontWeight axisY2TitleFontWeight;
        private int axisY2TitleFontSize;
        private BrushEx axisY2TitleFontColor;
        private IntervalTypes axisY2IntervalType;
        private string axisY2Prefix;
        private string axisY2Suffix;
        private string axisY2ValueFormatString;

        private bool axisY2LabelEnable;
        private FontFamily axisY2LabelFontFamily;
        private FontWeight axisY2LabelFontWeight;
        private int axisY2LabelFontSize;
        private BrushEx axisY2LabelFontColor;
        private double? axisY2LabelAngle;
        private int axisY2LabelRows;
        private TextAlignment axisY2LabelTextAlignmnet;
        private double? axisY2LabelTextWrap;
        private double? axisY2LabelInterval;

        private bool axisY2ChartGridEnable;
        private BrushEx axisY2ChartGridLineColor;
        private LineStyles axisY2ChartGridLineStyle;
        private int axisY2ChartGridLineThickness;
        private BrushEx axisY2ChartGridInterlacedColor;
        private double? axisY2ChartGridInterval;

        private bool axisY2TickEnabled;
        private double? axisY2TickInterval;
        private BrushEx axisY2TickLineColor;
        private LineStyles axisY2TickLineStyles;
        private double axisY2TickLineThickness;
        private double axisY2TickLength;

        #region Axis
        [Category("第二Y轴")]
        [DisplayName("第二Y轴是否可用")]
        [Description("AxisY2Enabled")]
        [Editor(typeof(UI.XProperty.Editors.XBooleanEditor), typeof(UI.XProperty.XPropertyValueEditor))]
        [XProperty(XPropertyCategory.Other, "AxisY2Enabled", "第二Y轴是否可用")]
        public bool AxisY2Enabled
        {
            get
            {
                return axisY2Enabled;
            }

            set
            {
                axisY2Enabled = value;
                Refresh();
            }
        }

        [Category("第二Y轴")]
        [DisplayName("第二Y轴是否从0开始")]
        [Description("AxisY2StartFromZero")]
        [Editor(typeof(UI.XProperty.Editors.XBooleanEditor), typeof(UI.XProperty.XPropertyValueEditor))]
        [XProperty(XPropertyCategory.Other, "AxisY2StartFromZero", "第二Y轴是否从0开始")]
        public bool AxisY2StartFromZero
        {
            get
            {
                return axisY2StartFromZero;
            }

            set
            {
                axisY2StartFromZero = value;
                Refresh();
            }
        }

        [Category("第二Y轴")]
        [DisplayName("第二Y轴最小值")]
        [Description("AxisY2Minimum")]
        [Editor(typeof(UI.XProperty.Editors.XDoubleEditor), typeof(UI.XProperty.XPropertyValueEditor))]
        [XProperty(XPropertyCategory.Other, "AxisY2Minimum", "第二Y轴最小值")]
        public double AxisY2Minimum
        {
            get
            {
                return axisY2Minimum;
            }

            set
            {
                axisY2Minimum = value;
                Refresh();
            }
        }

        [Category("第二Y轴")]
        [DisplayName("第二Y轴最大值")]
        [Description("AxisY2Maximum")]
        [Editor(typeof(UI.XProperty.Editors.XDoubleEditor), typeof(UI.XProperty.XPropertyValueEditor))]
        [XProperty(XPropertyCategory.Other, "AxisY2Maximum", "第二Y轴最大值")]
        public double AxisY2Maximum
        {
            get
            {
                return axisY2Maximum;
            }

            set
            {
                axisY2Maximum = value;
                Refresh();
            }
        }

        [Category("第二Y轴")]
        [DisplayName("第二Y轴步长")]
        [Description("AxisY2Interval")]
        [Editor(typeof(UI.XProperty.Editors.XDoubleEditor), typeof(UI.XProperty.XPropertyValueEditor))]
        [XProperty(XPropertyCategory.Other, "AxisY2Interval", "第二Y轴步长")]
        public double AxisY2Interval
        {
            get
            {
                return axisY2Interval;
            }

            set
            {
                axisY2Interval = value;
                Refresh();
            }
        }

        [Category("第二Y轴")]
        [DisplayName("第二Y轴步长类型")]
        [Description("AxisY2IntervalType")]
        [Editor(typeof(UI.DataPartLib.XProperty.Editors.XIntervalTypesEditor), typeof(UI.XProperty.XPropertyValueEditor))]
        [XProperty(XPropertyCategory.Other, "AxisY2IntervalType", "第二Y轴步长类型")]
        public IntervalTypes AxisY2IntervalType
        {
            get
            {
                return axisY2IntervalType;
            }

            set
            {
                axisY2IntervalType = value;
                Refresh();
            }
        }

        [Category("第二Y轴")]
        [DisplayName("第二Y轴线样式")]
        [Description("AxisY2LineStyle")]
        [Editor(typeof(UI.DataPartLib.XProperty.Editors.XLineStylesEditor), typeof(UI.XProperty.XPropertyValueEditor))]
        [XProperty(XPropertyCategory.Other, "AxisY2LineStyle", "第二Y轴线样式")]
        public LineStyles AxisY2LineStyle
        {
            get
            {
                return axisY2LineStyle;
            }

            set
            {
                axisY2LineStyle = value;
                Refresh();
            }
        }

        [Category("第二Y轴")]
        [DisplayName("第二Y轴线颜色")]
        [Description("AxisY2LineColor")]
        [Editor(typeof(UI.XProperty.Editors.XBrushEditor), typeof(UI.XProperty.XPropertyValueEditor))]
        [XProperty(XPropertyCategory.Other, "AxisY2LineColor", "第二Y轴线颜色")]
        public BrushEx AxisY2LineColor
        {
            get
            {
                return axisY2LineColor;
            }

            set
            {
                axisY2LineColor = value;
                Refresh();
            }
        }

        [Category("第二Y轴")]
        [DisplayName("第二Y轴线宽度")]
        [Description("AxisY2LineThickness")]
        [Editor(typeof(UI.XProperty.Editors.XIntEditor), typeof(UI.XProperty.XPropertyValueEditor))]
        [XProperty(XPropertyCategory.Other, "AxisY2LineThickness", "第二Y轴线宽度")]
        public int AxisY2LineThickness
        {
            get
            {
                return axisY2LineThickness;
            }

            set
            {
                axisY2LineThickness = value;
                Refresh();
            }
        }

        [Category("第二Y轴")]
        [DisplayName("第二Y轴标题")]
        [Description("AxisY2Title")]
        [Editor(typeof(UI.XProperty.Editors.XStringEditor), typeof(UI.XProperty.XPropertyValueEditor))]
        [XProperty(XPropertyCategory.Other, "AxisY2Title", "第二Y轴标题")]
        public string AxisY2Title
        {
            get
            {
                return axisY2Title;
            }

            set
            {
                axisY2Title = value;
                Refresh();
            }
        }

        [Category("第二Y轴")]
        [DisplayName("第二Y轴标题字体")]
        [Description("AxisY2TitleFontFamily")]
        [Editor(typeof(UI.XProperty.Editors.XFontFamilyEditor), typeof(UI.XProperty.XPropertyValueEditor))]
        [XProperty(XPropertyCategory.Other, "AxisY2TitleFontFamily", "第二Y轴标题字体")]
        public FontFamily AxisY2TitleFontFamily
        {
            get
            {
                return axisY2TitleFontFamily;
            }

            set
            {
                axisY2TitleFontFamily = value;
                Refresh();
            }
        }

        [Category("第二Y轴")]
        [DisplayName("第二Y轴标题字体粗细")]
        [Description("AxisY2TitleFontWeight")]
        [Editor(typeof(UI.XProperty.Editors.XFontWeightEditor), typeof(UI.XProperty.XPropertyValueEditor))]
        [XProperty(XPropertyCategory.Other, "AxisY2TitleFontWeight", "第二Y轴标题字体粗细")]
        public FontWeight AxisY2TitleFontWeight
        {
            get
            {
                return axisY2TitleFontWeight;
            }

            set
            {
                axisY2TitleFontWeight = value;
                Refresh();
            }
        }

        [Category("第二Y轴")]
        [DisplayName("第二Y轴标题字体大小")]
        [Description("AxisY2TitleFontSize")]
        [Editor(typeof(UI.XProperty.Editors.XIntEditor), typeof(UI.XProperty.XPropertyValueEditor))]
        [XProperty(XPropertyCategory.Other, "AxisY2TitleFontSize", "第二Y轴标题字体大小")]
        public int AxisY2TitleFontSize
        {
            get
            {
                return axisY2TitleFontSize;
            }

            set
            {
                axisY2TitleFontSize = value;
                Refresh();
            }
        }

        [Category("第二Y轴")]
        [DisplayName("第二Y轴标题字体颜色")]
        [Description("AxisY2TitleFontColor")]
        [Editor(typeof(UI.XProperty.Editors.XBrushEditor), typeof(UI.XProperty.XPropertyValueEditor))]
        [XProperty(XPropertyCategory.Other, "AxisY2TitleFontColor", "第二Y轴标题字体颜色")]
        public BrushEx AxisY2TitleFontColor
        {
            get
            {
                return axisY2TitleFontColor;
            }

            set
            {
                axisY2TitleFontColor = value;
                Refresh();
            }
        }

        [Category("第二Y轴")]
        [DisplayName("第二Y轴前缀")]
        [Description("AxisY2Prefix")]
        [Editor(typeof(UI.XProperty.Editors.XStringEditor), typeof(UI.XProperty.XPropertyValueEditor))]
        [XProperty(XPropertyCategory.Other, "AxisY2Prefix", "第二Y轴前缀")]
        public string AxisY2Prefix
        {
            get
            {
                return axisY2Prefix;
            }

            set
            {
                axisY2Prefix = value;
                Refresh();
            }
        }

        [Category("第二Y轴")]
        [DisplayName("第二Y轴后缀")]
        [Description("AxisY2Suffix")]
        [Editor(typeof(UI.XProperty.Editors.XStringEditor), typeof(UI.XProperty.XPropertyValueEditor))]
        [XProperty(XPropertyCategory.Other, "AxisY2Suffix", "第二Y轴后缀")]
        public string AxisY2Suffix
        {
            get
            {
                return axisY2Suffix;
            }

            set
            {
                axisY2Suffix = value;
                Refresh();
            }
        }

        [Category("第二Y轴")]
        [DisplayName("第二Y轴格式化")]
        [Description("AxisY2ValueFormatString")]
        [Editor(typeof(UI.XProperty.Editors.XStringEditor), typeof(UI.XProperty.XPropertyValueEditor))]
        [XProperty(XPropertyCategory.Other, "AxisY2ValueFormatString", "第二Y轴格式化")]
        public string AxisY2ValueFormatString
        {
            get
            {
                return axisY2ValueFormatString;
            }

            set
            {
                axisY2ValueFormatString = value;
                Refresh();
            }
        }
        #endregion

        #region AxisLabels
        [Category("第二Y轴")]
        [DisplayName("第二Y轴是否显示文本")]
        [Description("AxisY2LabelEnable")]
        [Editor(typeof(UI.XProperty.Editors.XBooleanEditor), typeof(UI.XProperty.XPropertyValueEditor))]
        [XProperty(XPropertyCategory.Other, "AxisY2LabelEnable", "第二Y轴是否显示文本")]
        public bool AxisY2LabelEnable
        {
            get
            {
                return axisY2LabelEnable;
            }

            set
            {
                axisY2LabelEnable = value;
                Refresh();
            }
        }

        [Category("第二Y轴")]
        [DisplayName("第二Y轴文本字体")]
        [Description("AxisY2LabelFontFamily")]
        [Editor(typeof(UI.XProperty.Editors.XFontFamilyEditor), typeof(UI.XProperty.XPropertyValueEditor))]
        [XProperty(XPropertyCategory.Other, "AxisY2LabelFontFamily", "第二Y轴文本字体")]
        public FontFamily AxisY2LabelFontFamily
        {
            get
            {
                return axisY2LabelFontFamily;
            }

            set
            {
                axisY2LabelFontFamily = value;
                Refresh();
            }
        }

        [Category("第二Y轴")]
        [DisplayName("第二Y轴文本字体粗细")]
        [Description("AxisY2LabelFontWeight")]
        [Editor(typeof(UI.XProperty.Editors.XFontWeightEditor), typeof(UI.XProperty.XPropertyValueEditor))]
        [XProperty(XPropertyCategory.Other, "AxisY2LabelFontWeight", "第二Y轴文本字体粗细")]
        public FontWeight AxisY2LabelFontWeight
        {
            get
            {
                return axisY2LabelFontWeight;
            }

            set
            {
                axisY2LabelFontWeight = value;
                Refresh();
            }
        }

        [Category("第二Y轴")]
        [DisplayName("第二Y轴文本字体大小")]
        [Description("AxisY2LabelFontSize")]
        [Editor(typeof(UI.XProperty.Editors.XIntEditor), typeof(UI.XProperty.XPropertyValueEditor))]
        [XProperty(XPropertyCategory.Other, "AxisY2LabelFontSize", "第二Y轴文本字体大小")]
        public int AxisY2LabelFontSize
        {
            get
            {
                return axisY2LabelFontSize;
            }

            set
            {
                axisY2LabelFontSize = value;
                Refresh();
            }
        }

        [Category("第二Y轴")]
        [DisplayName("第二Y轴文本字体颜色")]
        [Description("AxisY2LabelFontColor")]
        [Editor(typeof(UI.XProperty.Editors.XBrushEditor), typeof(UI.XProperty.XPropertyValueEditor))]
        [XProperty(XPropertyCategory.Other, "AxisY2LabelFontColor", "第二Y轴文本字体颜色")]
        public BrushEx AxisY2LabelFontColor
        {
            get
            {
                return axisY2LabelFontColor;
            }

            set
            {
                axisY2LabelFontColor = value;
                Refresh();
            }
        }

        [Category("第二Y轴")]
        [DisplayName("第二Y轴文本倾斜角度")]
        [Description("AxisY2LabelAngle")]
        [Editor(typeof(UI.XProperty.Editors.XDoubleNullEditor), typeof(UI.XProperty.XPropertyValueEditor))]
        [XProperty(XPropertyCategory.Other, "AxisY2LabelAngle", "第二Y轴文本倾斜角度")]
        public double? AxisY2LabelAngle
        {
            get
            {
                return axisY2LabelAngle;
            }

            set
            {
                axisY2LabelAngle = value;
                Refresh();
            }
        }

        [Category("第二Y轴")]
        [DisplayName("第二Y轴文本显示行数")]
        [Description("AxisY2LabelRows")]
        [Editor(typeof(UI.XProperty.Editors.XIntEditor), typeof(UI.XProperty.XPropertyValueEditor))]
        [XProperty(XPropertyCategory.Other, "AxisY2LabelRows", "第二Y轴文本显示行数")]
        public int AxisY2LabelRows
        {
            get
            {
                return axisY2LabelRows;
            }

            set
            {
                axisY2LabelRows = value;
                Refresh();
            }
        }

        //[Category("第二Y轴")]
        //[DisplayName("第二Y轴文本对齐")]
        //[Description("AxisY2LabelTextAlignmnet")]
        //[Editor(typeof(UI.XProperty.Editors.XTextAlignmentEditor), typeof(UI.XProperty.XPropertyValueEditor))]
        //[XProperty(XPropertyCategory.Other, "AxisY2LabelTextAlignmnet", "第二Y轴文本对齐")]
        public TextAlignment AxisY2LabelTextAlignmnet
        {
            get
            {
                return axisY2LabelTextAlignmnet;
            }

            set
            {
                axisY2LabelTextAlignmnet = value;
                Refresh();
            }
        }

        [Category("第二Y轴")]
        [DisplayName("第二Y轴文本换行(0-1)")]
        [Description("AxisY2LabelTextWrap")]
        [Editor(typeof(UI.XProperty.Editors.XDoubleNullEditor), typeof(UI.XProperty.XPropertyValueEditor))]
        [XProperty(XPropertyCategory.Other, "AxisY2LabelTextWrap", "第二Y轴文本换行(0-1)")]
        public double? AxisY2LabelTextWrap
        {
            get
            {
                return axisY2LabelTextWrap;
            }

            set
            {
                axisY2LabelTextWrap = value;
                Refresh();
            }
        }
        //[Category("第二Y轴")]
        //[DisplayName("第二Y轴文本步长")]
        //[Description("AxisY2LabelInterval")]
        //[Editor(typeof(UI.XProperty.Editors.XDoubleNullEditor), typeof(UI.XProperty.XPropertyValueEditor))]
        //[XProperty(XPropertyCategory.Other, "AxisY2LabelInterval", "第二Y轴文本步长")]
        public double? AxisY2LabelInterval
        {
            get
            {
                return axisY2LabelInterval;
            }

            set
            {
                axisY2LabelInterval = value;
                Refresh();
            }
        }
        #endregion

        #region ChartGrid
        [Category("第二Y轴")]
        [DisplayName("第二Y轴是否网格线")]
        [Description("AxisY2ChartGridEnable")]
        [Editor(typeof(UI.XProperty.Editors.XBooleanEditor), typeof(UI.XProperty.XPropertyValueEditor))]
        [XProperty(XPropertyCategory.Other, "AxisY2ChartGridEnable", "第二Y轴是否网格线")]
        public bool AxisY2ChartGridEnable
        {
            get
            {
                return axisY2ChartGridEnable;
            }

            set
            {
                axisY2ChartGridEnable = value;
                Refresh();
            }
        }

        [Category("第二Y轴")]
        [DisplayName("第二Y轴网格线颜色")]
        [Description("AxisY2ChartGridLineColor")]
        [Editor(typeof(UI.XProperty.Editors.XBrushEditor), typeof(UI.XProperty.XPropertyValueEditor))]
        [XProperty(XPropertyCategory.Other, "AxisY2ChartGridLineColor", "第二Y轴网格线颜色")]
        public BrushEx AxisY2ChartGridLineColor
        {
            get
            {
                return axisY2ChartGridLineColor;
            }

            set
            {
                axisY2ChartGridLineColor = value;
                Refresh();
            }
        }

        [Category("第二Y轴")]
        [DisplayName("第二Y轴网格线类型")]
        [Description("AxisY2ChartGridLineStyle")]
        [Editor(typeof(UI.DataPartLib.XProperty.Editors.XLineStylesEditor), typeof(UI.XProperty.XPropertyValueEditor))]
        [XProperty(XPropertyCategory.Other, "AxisY2ChartGridLineStyle", "第二Y轴网格线类型")]
        public LineStyles AxisY2ChartGridLineStyle
        {
            get
            {
                return axisY2ChartGridLineStyle;
            }

            set
            {
                axisY2ChartGridLineStyle = value;
                Refresh();
            }
        }

        [Category("第二Y轴")]
        [DisplayName("第二Y轴网格线宽度")]
        [Description("AxisY2ChartGridLineThickness")]
        [Editor(typeof(UI.XProperty.Editors.XIntEditor), typeof(UI.XProperty.XPropertyValueEditor))]
        [XProperty(XPropertyCategory.Other, "AxisY2ChartGridLineThickness", "第二Y轴网格线宽度")]
        public int AxisY2ChartGridLineThickness
        {
            get
            {
                return axisY2ChartGridLineThickness;
            }

            set
            {
                axisY2ChartGridLineThickness = value;
                Refresh();
            }
        }

        [Category("第二Y轴")]
        [DisplayName("第二Y轴网格线间隔颜色")]
        [Description("AxisY2ChartGridInterlacedColor")]
        [Editor(typeof(UI.XProperty.Editors.XBrushEditor), typeof(UI.XProperty.XPropertyValueEditor))]
        [XProperty(XPropertyCategory.Other, "AxisY2ChartGridInterlacedColor", "第二Y轴网格线间隔颜色")]
        public BrushEx AxisY2ChartGridInterlacedColor
        {
            get
            {
                return axisY2ChartGridInterlacedColor;
            }

            set
            {
                axisY2ChartGridInterlacedColor = value;
                Refresh();
            }
        }

        //[Category("第二Y轴")]
        //[DisplayName("第二Y轴网格线步长")]
        //[Description("AxisY2ChartGridInterval")]
        //[Editor(typeof(UI.XProperty.Editors.XDoubleNullEditor), typeof(UI.XProperty.XPropertyValueEditor))]
        //[XProperty(XPropertyCategory.Other, "AxisY2ChartGridInterval", "第二Y轴网格线步长")]
        public double? AxisY2ChartGridInterval
        {
            get
            {
                return axisY2ChartGridInterval;
            }

            set
            {
                axisY2ChartGridInterval = value;
                Refresh();
            }
        }
        #endregion

        #region Tick
        [Category("第二Y轴")]
        [DisplayName("第二Y轴是否显示刻度")]
        [Description("AxisY2TickEnabled")]
        [Editor(typeof(UI.XProperty.Editors.XBooleanEditor), typeof(UI.XProperty.XPropertyValueEditor))]
        [XProperty(XPropertyCategory.Other, "AxisY2TickEnabled", "第二Y轴是否显示刻度")]
        public bool AxisY2TickEnabled
        {
            get
            {
                return axisY2TickEnabled;
            }

            set
            {
                axisY2TickEnabled = value;
                Refresh();
            }
        }

        //[Category("第二Y轴")]
        //[DisplayName("第二Y轴刻度步长")]
        //[Description("AxisY2TickInterval")]
        //[Editor(typeof(UI.XProperty.Editors.XDoubleNullEditor), typeof(UI.XProperty.XPropertyValueEditor))]
        //[XProperty(XPropertyCategory.Other, "AxisY2TickInterval", "第二Y轴刻度步长")]
        public double? AxisY2TickInterval
        {
            get
            {
                return axisY2TickInterval;
            }

            set
            {
                axisY2TickInterval = value;
                Refresh();
            }
        }

        [Category("第二Y轴")]
        [DisplayName("第二Y轴刻度线颜色")]
        [Description("AxisY2TickLineColor")]
        [Editor(typeof(UI.XProperty.Editors.XBrushEditor), typeof(UI.XProperty.XPropertyValueEditor))]
        [XProperty(XPropertyCategory.Other, "AxisY2TickLineColor", "第二Y轴刻度线颜色")]
        public BrushEx AxisY2TickLineColor
        {
            get
            {
                return axisY2TickLineColor;
            }

            set
            {
                axisY2TickLineColor = value;
                Refresh();
            }
        }

        [Category("第二Y轴")]
        [DisplayName("第二Y轴刻度线样式")]
        [Description("AxisY2TickLineStyles")]
        [Editor(typeof(UI.DataPartLib.XProperty.Editors.XLineStylesEditor), typeof(UI.XProperty.XPropertyValueEditor))]
        [XProperty(XPropertyCategory.Other, "AxisY2TickLineStyles", "第二Y轴刻度线样式")]
        public LineStyles AxisY2TickLineStyles
        {
            get
            {
                return axisY2TickLineStyles;
            }

            set
            {
                axisY2TickLineStyles = value;
                Refresh();
            }
        }

        [Category("第二Y轴")]
        [DisplayName("第二Y轴刻度线宽度")]
        [Description("AxisY2TickLineThickness")]
        [Editor(typeof(UI.XProperty.Editors.XDoubleEditor), typeof(UI.XProperty.XPropertyValueEditor))]
        [XProperty(XPropertyCategory.Other, "AxisY2TickLineThickness", "第二Y轴刻度线宽度")]
        public double AxisY2TickLineThickness
        {
            get
            {
                return axisY2TickLineThickness;
            }

            set
            {
                axisY2TickLineThickness = value;
                Refresh();
            }
        }

        [Category("第二Y轴")]
        [DisplayName("第二Y轴刻度线长度")]
        [Description("AxisY2TickLength")]
        [Editor(typeof(UI.XProperty.Editors.XDoubleEditor), typeof(UI.XProperty.XPropertyValueEditor))]
        [XProperty(XPropertyCategory.Other, "AxisY2TickLength", "第二Y轴刻度线长度")]
        public double AxisY2TickLength
        {
            get
            {
                return axisY2TickLength;
            }

            set
            {
                axisY2TickLength = value;
                Refresh();
            }
        }
        #endregion
        private bool isAutoReviseY2Axis;
        [Category("第二Y轴")]
        [DisplayName("第二Y轴自动修正Y轴的刻度")]
        [Description("IsAutoReviseY2Axis")]
        [Editor(typeof(UI.XProperty.Editors.XBooleanEditor), typeof(UI.XProperty.XPropertyValueEditor))]
        [XProperty(XPropertyCategory.Other, "IsAutoReviseY2Axis", "第二Y轴自动修正Y轴的刻度")]
        public bool IsAutoReviseY2Axis
        {
            get
            {
                return isAutoReviseYAxis;
            }
            set
            {
                isAutoReviseYAxis = value;
                Refresh();
            }
        }
        public SeriesYAxisType seriesYAxisType;
        [Category("第二Y轴")]
        [DisplayName("数据串对应的Y轴类型")]
        [Description("SeriesYAxisType")]
        [Editor(typeof(XProperty.Editors.XSeriesYAxisTypeEditor), typeof(UI.XProperty.XPropertyValueEditor))]
        [XProperty(XPropertyCategory.Other, "SeriesYAxisType", "数据串对应的Y轴类型")]
        public SeriesYAxisType SeriesYAxisType
        {
            get
            {
                return seriesYAxisType;
            }
            set
            {
                seriesYAxisType = value;
                Refresh();
            }
        }

        //[Category("第二Y轴")]
        //[DisplayName("第二Y轴是否使用对数显示")]
        //[Description("AxisY2Logarithmic")]
        //[Editor(typeof(UI.XProperty.Editors.XBooleanEditor), typeof(UI.XProperty.XPropertyValueEditor))]
        //[XProperty(XPropertyCategory.Other, "AxisY2Logarithmic", "Y轴是否使用对数显示")]
        public bool AxisY2Logarithmic
        {
            get
            {
                return axisYLogarithmic;
            }

            set
            {
                axisYLogarithmic = value;
                Refresh();
            }
        }

        //[Category("第二Y轴")]
        //[DisplayName("第二Y轴使用对数底")]
        //[Description("AxisY2LogarithmBase")]
        //[Editor(typeof(UI.XProperty.Editors.XIntEditor), typeof(UI.XProperty.XPropertyValueEditor))]
        //[XProperty(XPropertyCategory.Other, "AxisY2LogarithmBase", "Y轴使用对数底")]
        public int AxisY2LogarithmBase
        {
            get
            {
                return axisYLogarithmBase;
            }

            set
            {
                axisYLogarithmBase = value;
                Refresh();
            }
        }

        private bool axisY2Logarithmic;

        private int axisY2LogarithmBase;
    }
}
